﻿using System;
using System.Collections.Generic;
using System.Text;
using Server.Items;
using Server;

namespace Scripts.Scripts.Items.Special.Custom
{
    public class CraftedSkillBall : SkillBall
    {
        // Ball Graphics 
        /*
         * 12690
         * 12691
         * 12693 - 12697
         */
        [Constructable]
        public CraftedSkillBall(int points)
            :base(points)
        {
            //SkillBonus = 0.1;
            Movable = true;
            
            Random r = new Random();
            int skillValue = r.Next(5);
            string convert = string.Format("0.{0}", skillValue);

            double d = 0;
            /*
            if (double.TryParse(convert, out d))
            {
                if (SkillBonus == 0)
                {
                    SkillBonus = 0.1;
                }
                else
                {
                    SkillBonus = d;
                }

                switch (skillValue)
                {
                    case 2:
                        Name = string.Format("A Sparkling Crafted SkillBall ({0})", SkillBonus);
                        break;
                    case 3:
                        Name = string.Format("A Shimmering Crafted SkillBall ({0})", SkillBonus);
                        break;
                    case 4:
                        Name = string.Format("A Pulsing Crafted SkillBall ({0})", SkillBonus);
                        break;
                    case 5:
                        Name = string.Format("A Vibrating Crafted SkillBall ({0})", SkillBonus);
                        break;
                    default:
                        Name = string.Format("A Glowing Crafted SkillBall ({0})", SkillBonus);
                        break;
                }
             
            }
            else
            {
                SkillBonus = (int)0.1;
                Name = string.Format("A Fallthrough Errored Crafted SkillBall ({0})", SkillBonus);
            }
             */
        }
        public CraftedSkillBall(Serial serial)
            : base(serial)
        {
        }
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)0); // version
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
        }
    }
}
